'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
function s({ format: g, minFractionDigits: r, tag: f, value: i }) {
  if (typeof i == 'bigint') return String(i);
  const n = typeof i == 'number' ? i : Number(i);
  if (!isFinite(n)) return isNaN(n) ? '.nan' : n < 0 ? '-.inf' : '.inf';
  let t = JSON.stringify(i);
  if (!g && r && (!f || f === 'tag:yaml.org,2002:float') && /^\d/.test(t)) {
    let e = t.indexOf('.');
    e < 0 && ((e = t.length), (t += '.'));
    let o = r - (t.length - e - 1);
    for (; o-- > 0; ) t += '0';
  }
  return t;
}
exports.stringifyNumber = s;
